package com.samg.learning;

import com.samg.learning.service.HelloService;

import java.net.MalformedURLException;
import java.rmi.Naming;
import java.rmi.NotBoundException;
import java.rmi.RemoteException;

public class ClientMain {
    public static void main(String[] args) throws RemoteException, NotBoundException, MalformedURLException {
        HelloService helloService = (HelloService) Naming.lookup("rmi://localhost:8801/helloService");
        System.out.println("RMI服务器返回的结果是：" + helloService.sayHello("liyebing"));
    }
}
